<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class UserTransaction extends Model
{
    const TYPE_TOP_UP = 1;
    const TYPE_CONSUME = 2;
    protected $fillable = [
        'seller_id',
        'user_id',
        'desc',
        'amount',
        'price',
        'type',
        'sn'
    ];
    //
    public function user(){
        return $this->belongsTo(User::class,'user_id','id');
    }
    public function seller(){
        return $this->belongsTo(Seller::class,'seller_id','id');
    }
}
